//
//  MovieThreeCell.m
//  12.30_homework_豆瓣电影MVC
//
//  Created by dllo on 16/1/4.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "MovieThreeCell.h"

@implementation MovieThreeCell

- (void)dealloc {
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatCell];
    }
    return self;
}

- (void)creatCell {
    
    self.moviePic1 = [[UIImageView alloc] init];
    [self.contentView addSubview:_moviePic1];
    [_moviePic1 release];
    
    self.movieName1 = [[UILabel alloc] init];
    [self.contentView addSubview:_movieName1];
    [_movieName1 release];
    
    self.moviePic2 = [[UIImageView alloc] init];
    [self.contentView addSubview:_moviePic2];
    [_moviePic2 release];
    
    self.movieName2 = [[UILabel alloc] init];
    [self.contentView addSubview:_movieName2];
    [_movieName2 release];
    
    self.moviePic3 = [[UIImageView alloc] init];
    [self.contentView addSubview:_moviePic3];
    [_moviePic3 release];
    
    self.movieName3 = [[UILabel alloc] init];
    [self.contentView addSubview:_movieName3];
    [_movieName3 release];
    
}
- (void)layoutSubviews {
    [super layoutSubviews];
    
    _moviePic1.frame = CGRectMake(20, 20, self.contentView.frame.size.width / 3 - 20, 160);
    _moviePic1.backgroundColor = [UIColor clearColor];
    
    _movieName1.frame = CGRectMake(25, 180, 100, 30);
    _movieName1.textAlignment = NSTextAlignmentCenter;
    _movieName1.backgroundColor = [UIColor clearColor];
    
    _moviePic2.frame = CGRectMake(self.contentView.frame.size.width / 3 + 10, 20, self.contentView.frame.size.width / 3 - 20, 160);
    _moviePic2.backgroundColor = [UIColor clearColor];
    
    _movieName2.frame = CGRectMake(self.contentView.frame.size.width / 3 + 15, 180, 100, 30);
    _movieName2.backgroundColor = [UIColor clearColor];
    _movieName2.textAlignment = NSTextAlignmentCenter;

    
    _moviePic3.frame = CGRectMake(self.contentView.frame.size.width / 3 * 2 + 10, 20, self.contentView.frame.size.width / 3 - 20, 160);
    _moviePic3.backgroundColor = [UIColor clearColor];
    
    _movieName3.frame = CGRectMake(self.contentView.frame.size.width / 3 * 2 + 15, 180, 100, 30);
    _movieName3.backgroundColor = [UIColor clearColor];
    _movieName3.textAlignment = NSTextAlignmentCenter;

    
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
